<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <base href="../../" />
    <script src="list.js"></script>
    <script src="page.js"></script>
    <link type="text/css" rel="stylesheet" href="page.css" />
  </head>
  <body>
    <h1>[name]</h1>

    <div class="desc">
    Buffered scene graph property that allows weighted accumulation.
    </div>


    <h2>Constructor</h2>


    <h3>[name]( binding, typeName, valueSize )</h3>
    <div>
      -- binding <br />
      -- typeName <br />
      -- valueSize <br />
    </div>


    <h2>Properties</h2>


    <h3>[property:Number binding]</h3>
    <div>

    </div>

    <h3>[property:Number buffer]</h3>
    <div>
      Buffer with size [page:PropertyMixer valueSize] * 4. <br /><br />
      This has the layout: [ incoming | accu0 | accu1 | orig ]<br /><br />
      Interpolators can use .buffer as their .result and the data then goes to 'incoming'.<br />
      'accu0' and 'accu1' are used frame-interleaved for the cumulative result and
      are compared to detect changes.<br />
      'orig' stores the original state of the property.<br />
    </div>

    <h3>[property:Number cumulativeWeight]</h3>
    <div>
      Default is *0*.
    </div>

    <h3>[property:Number valueSize]</h3>
    <div>

    </div>

    <h3>[property:Number referenceCount]</h3>
    <div>
      Default is *0*.
    </div>

    <h3>[property:Number useCount]</h3>
    <div>
      Default is *0*.
    </div>


    <h2>Methods</h2>


    <h3>[method:null accumulate]( accuIndex, weight )</h3>
    <div>
      Accumulate data in [page:PropertyMixer.buffer buffer][accuIndex] 'incoming' region into 'accu[i]'.<br />

      If weight is *0* this does nothing.
    </div>

    <h3>[method:null apply]( accuIndex )</h3>
    <div>
      Apply the state of [page:PropertyMixer.buffer buffer] 'accu[i]' to the binding when accus differ.
    </div>

    <h3>[method:null saveOriginalState]( )</h3>
    <div>
      Remember the state of the bound property and copy it to both accus.
    </div>

    <h3>[method:null restoreOriginalState](  )</h3>
    <div>
      Apply the state previously taken via 'saveOriginalState' to the binding.
    </div>


    <h2>Source</h2>


    [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  </body>
</html>
